package com.zhouyu.service;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.stereotype.Component;

import javax.annotation.PreDestroy;

@Component
public class DestroyBean{

	// implements AutoCloseable, DisposableBean
	public void close(){
		System.out.println("close");
	}

	public void shutdown(){
		System.out.println("shutdown");
	}
//	@PreDestroy
//	public void test(){
//		System.out.println("执行销毁方法");
//	}
//
//
//	@Override
//	public void close() throws Exception {
//		System.out.println("执行close的销毁方法");
//	}
//
//	@Override
//	public void destroy() throws Exception {
//		System.out.println("执行destroy的销毁方法");
//	}
}
